{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "# 11.ScrapySpider Scrapy爬虫框架\n",
    "\n",
    "在上一章我们了解了pyspider框架的用法，我们可以利用它快速完成爬虫的编写\n",
    "\n",
    "不过 pyspider框架也有一些缺点，比如可配置化程度不高，异常处理能力有限等，\n",
    "它对于－些反爬程度非常强的网站的爬取显得力不从心\n",
    "\n",
    "所以本章我们再介绍一个爬虫框架 Scrapy\n",
    "\n",
    "Scrapy 功能非常强大，爬取效率高，相关扩展组件多，可配置和可扩展程度非常高，它几乎可以应对所有反爬网站，是目前Python使用最广泛的爬虫框架\n",
    "\n",
    "## 1. Introduction介绍\n",
    "\n",
    "Scrapy是基于 Twisted 的异步处理框架，是纯 Python 实现的爬虫框架，其架构清晰，\n",
    "模块之间的耦合程度低，可扩展性极强，可以灵活完成各种需求\n",
    "\n",
    "我们只需要定制开发几个模块就可以轻松实现一个爬虫\n",
    "\n",
    "下图是它的框架架构：\n",
    "![](ScrapyFrame.JPG)\n",
    "\n",
    "Anaconda Prompt 命令行安装，使用下面的命令："
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {
    "pycharm": {
     "name": "#%% raw\n"
    }
   },
   "source": [
    "conda install scrapy\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
